<?php
  function getHTML($page)
  {
    $html = '';
    if (file_exists($page))
    {
      $fp = fopen($page, 'r');
      if ($fp) {
        while (!feof($fp)) {
          $html .= trim(fgets($fp,1024));
          $html .= "\n";
        }
        fclose($fp);
      } else {
        die("Error while opening: " . $page);
      }
    } else {
      return "File $page doesn't exists";
    }
    return $html;
  }

echo getHTML('data.php');


